package com.sdry.service.impl.lz;

import java.util.List;

import javax.annotation.Resource;

import com.sdry.mapper.lz.SparePartsMapper;
import com.sdry.model.lz.LzQueryCriteria;
import com.sdry.model.lz.SpareParts;
import com.sdry.model.lz.SparePartsRepair;
import com.sdry.service.lz.SparePartsService;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName SparePartsServiceImpl
 * @Description 备品备件
 * @Author lz
 * @Date 2019年1月3日 09:18:56
 * @Version 1.0
 */
@Service
@Transactional
public class SparePartsServiceImpl implements SparePartsService {

	@Resource
	SparePartsMapper sparePartsMapper;
	
	@Override
	public Long addSpareParts(SpareParts spareParts) {
		return sparePartsMapper.addSpareParts(spareParts);
	}

	@Override
	public Long deleteSparePartsById(long id) {
		return sparePartsMapper.deleteSparePartsById(id);
	}

	@Override
	public Long editSparePartsById(SpareParts spareParts) {
		return sparePartsMapper.editSparePartsById(spareParts);
	}

	@Override
	public List<SpareParts> querySpareParts(LzQueryCriteria criteria) {
		return sparePartsMapper.querySpareParts(criteria);
	}

	@Override
	public int countSpareParts(LzQueryCriteria criteria) {
		return sparePartsMapper.countSpareParts(criteria);
	}

	@Override
	public List<SparePartsRepair> querySparePartsRepair(LzQueryCriteria criteria) {
		return sparePartsMapper.querySparePartsRepair(criteria);
	}

	@Override
	public int countSparePartsRepair(LzQueryCriteria criteria) {
		return sparePartsMapper.countSparePartsRepair(criteria);
	}

	@Override
	public Long addSparePartsRepair(SparePartsRepair sparePartsRepair) {
		return sparePartsMapper.addSparePartsRepair(sparePartsRepair);
	}

	@Override
	public Long updateSparePartsStatus(SparePartsRepair sparePartsRepair) {
		return sparePartsMapper.updateSparePartsStatus(sparePartsRepair);
	}

	@Override
	public List<SpareParts> queryAllSparePartsList() {
		return sparePartsMapper.queryAllSparePartsList();
	}

	@Override
	public List<SpareParts> querySparePartsByProductNo(String productNo) {
		return sparePartsMapper.querySparePartsByProductNo(productNo);
	}

	@Override
	public List<SpareParts> queryWarningStock() {
		return sparePartsMapper.queryWarningStock();
	}

}